package com.agritech.path;

/**
 * 路径点类
 * 表示路径中的一个点，包含坐标和可选的附加信息
 */
public class PathPoint {
    private double x; // X坐标
    private double y; // Y坐标
    private String pointType; // 点类型（起点、终点、中间点、避障点等）
    private String note; // 备注信息
    
    public PathPoint(double x, double y) {
        this.x = x;
        this.y = y;
        this.pointType = "中间点";
        this.note = "";
    }
    
    public PathPoint(double x, double y, String pointType) {
        this.x = x;
        this.y = y;
        this.pointType = pointType;
        this.note = "";
    }
    
    public PathPoint(double x, double y, String pointType, String note) {
        this.x = x;
        this.y = y;
        this.pointType = pointType;
        this.note = note;
    }
    
    // Getters and Setters
    public double getX() {
        return x;
    }
    
    public void setX(double x) {
        this.x = x;
    }
    
    public double getY() {
        return y;
    }
    
    public void setY(double y) {
        this.y = y;
    }
    
    public String getPointType() {
        return pointType;
    }
    
    public void setPointType(String pointType) {
        this.pointType = pointType;
    }
    
    public String getNote() {
        return note;
    }
    
    public void setNote(String note) {
        this.note = note;
    }
    
    @Override
    public String toString() {
        return "PathPoint{" +
                "x=" + x +
                ", y=" + y +
                ", type='" + pointType + '\'' +
                (note.isEmpty() ? "" : ", note='" + note + '\'') +
                '}';
    }
}